local shoushu = fk.CreateSkill {
  name = "shoushu",
  tags={Skill.Compulsory}
}

shoushu:addEffect(fk.RoundStart, {
  anim_type = "support",
  can_trigger = function(self, event, target, player, data)
    local room = player.room
    return player:hasSkill(self) and
      room:getCardArea(U.prepareDeriveCards(room, {{"js__peace_spell", Card.Heart, 3}}, "shoushu_spell")[1]) == Card.Void and
      table.find(room.alive_players, function(p)
        return p:hasEmptyEquipSlot(Card.SubtypeArmor)
      end)
  end,
  on_use = function(self, event, target, player, data)
    local room = player.room
    local targets = table.filter(room.alive_players, function(p) return p:hasEmptyEquipSlot(Card.SubtypeArmor) end)
    local to = room:askForChoosePlayers(player, table.map(targets, Util.IdMapper), 1, 1, "#shoushu-choose", self.name, false)
    to = room:getPlayerById(to[1])
    local spell = U.prepareDeriveCards(room, {{"js__peace_spell", Card.Heart, 3}}, "shoushu_spell")[1]
    room:setCardMark(Fk:getCardById(spell), MarkEnum.DestructOutEquip, 1)
    room:moveCardIntoEquip(to, spell, self.name, true, player)
  end,
})

return shoushu